package com.jastt.dal.entities;

// Generated 08.11.2014 14:19:16 by Hibernate Tools 4.0.0

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * AssigneeEntity generated by hbm2java
 */
@Entity
@Table(name = "ASSIGNEE", uniqueConstraints = @UniqueConstraint(columnNames = "EMAIL"))
public class AssigneeEntity extends GenericDalEntity<Integer> implements java.io.Serializable {

	private String name;
	private String email;
	private Set<IssueEntity> issueEntities = new HashSet<IssueEntity>(0);

	public AssigneeEntity() {
	}

	public AssigneeEntity(String name, String email) {
		this.name = name;
		this.email = email;
	}

	public AssigneeEntity(String name, String email,
			Set<IssueEntity> issueEntities) {
		this.name = name;
		this.email = email;
		this.issueEntities = issueEntities;
	}


	@Column(name = "NAME", nullable = false, length = 100)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "EMAIL", unique = true, nullable = false, length = 100)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "assigneeEntity")
	public Set<IssueEntity> getIssueEntities() {
		return this.issueEntities;
	}

	public void setIssueEntities(Set<IssueEntity> issueEntities) {
		this.issueEntities = issueEntities;
	}

}
